import { onMounted, ref } from 'vue'
import { fetchHotGoodsApi } from '@/apis/goods.js'

export function useGoodsHot(id, type) {
  const goodsHotList = ref({})
  onMounted(async () => {
    goodsHotList.value = await fetchHotGoodsApi(id, type, 4)
  })

  return {
    goodsHotList,
  }
}
